﻿using FreeSql.DataAnnotations;
using KrasDD.Models;
using Newtonsoft.Json;
using Microsoft.Extensions.Caching.Distributed;
using System;

namespace KrasDD.DyModels
{

    //  [JsonObject(MemberSerialization.OptIn), Table(Name = "[innovator].[ACCESS]", DisableSyncStructure = false)]
    public class Data : IAppBaseEntity
    {

        [JsonProperty, Column(DbType = "char(32)", IsPrimary = true, IsNullable = false)]
        public string ID { get; set; }

        public string CLASSIFICATION { get; set; }

        [JsonProperty, Column(DbType = "char(32)", IsNullable = false)]
        public string CONFIG_ID { get; set; }

        [JsonProperty, Column(DbType = "char(32)", IsNullable = false)]
        public string CREATED_BY_ID { get; set; }

        [JsonProperty]
        public DateTime CREATED_ON { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string CURRENT_STATE { get; set; }





        [JsonProperty]
        public int? GENERATION { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool IS_CURRENT { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool IS_RELEASED { get; set; }

        [JsonProperty, Column(StringLength = 128)]
        public string KEYED_NAME { get; set; }



        [JsonProperty, Column(DbType = "char(32)")]
        public string LOCKED_BY_ID { get; set; }

        [JsonProperty, Column(StringLength = 8)]
        public string MAJOR_REV { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string MANAGED_BY_ID { get; set; }

        [JsonProperty, Column(StringLength = 8)]
        public string MINOR_REV { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string MODIFIED_BY_ID { get; set; }

        [JsonProperty]
        public DateTime? MODIFIED_ON { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool NEW_VERSION { get; set; }

        [JsonProperty, Column(DbType = "bit")]
        public bool NOT_LOCKABLE { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string OWNED_BY_ID { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string PERMISSION_ID { get; set; }

        [JsonProperty, Column(StringLength = 32)]
        public string STATE { get; set; }

        [JsonProperty, Column(DbType = "char(32)")]
        public string TEAM_ID { get; set; }



        #region 外键 => 导航属性，ManyToOne/OneToOne




        #endregion
    }
}
